<%--
  Created by IntelliJ IDEA.
  User: xiong
  Date: 2020/7/11
  Time: 9:59
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>这是食物的详情页面</title>
    <link rel="stylesheet" href="layui/css/layui.css">
    <script src="layui/layui.js"></script>
    <script src="/js/jquery-3.5.1.min.js"></script>
</head>
<style>

    .head{
        float: left;
        width: 100%;
    }
    .head-left{
        width: 30%;
        height: 150px;
        float: left;
        text-align: center;

    }
    .head-right{
        width: 70%;
        margin-top: 20px;
        height: 150px;
    }
    .head-right h1{
        font-weight: bold;
        margin-bottom: 20px;
    }
    .head-left img{
        width: 50%;
        margin-top: 20px;
        height: 100%;
        border: solid black 1px;
    }
    .foot{
        height: 20px;
        text-align: center;
        margin-right: 150px;
    }
    .foot span{

    }
    .foot button{
        margin-top: 10px;
        background-color: red;
        width: 200px;
    }
</style>
<body>
<div class="layui-main main">
    <div class="head layui-row" >
        <div class="head-left">
            <img src="img/jd.jpg">
        </div>
        <div class="head-right">
            <%-- 商品名称--%>
            <h1>${fooddetail.foodname}</h1>
            <%--    商品描述--%>
            <p>${fooddetail.remark}</p>
        </div>

    </div>
    <div class="foot layui-row">
        <%--        食物价格--%>
        <span>${fooddetail.price}元/份</span>
        <br>
<%--            添加到购物车的操作--%>
        <button class="layui-btn layui-btn-xs" id="addcarbtn">点击选购</button>
    </div>
</div>

</body>
</html>
<script>
    $('#addcarbtn').click(function () {
        alert("这只是装饰按钮，请到主界面添加")

    })
</script>
